package cn.jeeweb.modules.web.human.service.impl;

import cn.jeeweb.core.common.service.impl.CommonServiceImpl;
import cn.jeeweb.modules.web.human.mapper.HuHumanMsgMapper;
import cn.jeeweb.modules.web.human.entity.HuHumanMsg;
import cn.jeeweb.modules.web.human.service.IHuHumanMsgService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**   
 * @Title: 人力资源信息-效果图上的数据
 * @Description: 人力资源信息-效果图上的数据
 * @author hs
 * @date 2018-03-02 15:08:06
 * @version V1.0   
 *
 */
@Transactional
@Service("huHumanMsgService")
public class HuHumanMsgServiceImpl  extends CommonServiceImpl<HuHumanMsgMapper,HuHumanMsg> implements  IHuHumanMsgService {
    @Override
    public HuHumanMsg selectByLadorId(String laborId) {
        List<HuHumanMsg> huHumanMsgs = baseMapper.selectByLadorId(laborId);
        if(huHumanMsgs != null && huHumanMsgs.size() > 0){
            return huHumanMsgs.get(0);
        }
        return new HuHumanMsg();
    }
}
